Add User Functions to the Class Module

The next step is to add the actual User-Defined Functions that you want to appear in the Crystal Reports Formula Editor. These functions are standard Visual Basic functions that you might define in any Visual Basic project. The only requirement is that the functions are declared Public.

Type in the following function:

Public Function DateToString(date1 As Date) As String
    DateToString = Format(date1, "Long Date")
End Function

The U2LCOM.DLL UFL supports most standard Visual Basic data types and arrays. For complete information on how the Crystal Reports Formula Editor interprets Visual Basic data types and arrays, see the sections Visual Basic and Crystal Reports, and Using Arrays.



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com